// CodeGear C++Builder
// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'gnugettext.pas' rev: 36.00 (Windows)

#ifndef GnugettextHPP
#define GnugettextHPP

#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include <System.TypInfo.hpp>

//-- user supplied -----------------------------------------------------------

namespace Gnugettext
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TExecutable;
class DELPHICLASS TGnuGettextInstance;
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TTranslator)(System::TObject* obj);

#pragma pack(push,4)
class PASCALIMPLEMENTATION TExecutable : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	virtual void __fastcall Execute() = 0 ;
public:
	/* TObject.Create */ inline __fastcall TExecutable() : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TExecutable() { }
	
};

#pragma pack(pop)

typedef int __fastcall (*TGetPluralForm)(System::LongInt Number);

#pragma pack(push,4)
class PASCALIMPLEMENTATION TGnuGettextInstance : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	bool Enabled;
	__fastcall TGnuGettextInstance();
	__fastcall virtual ~TGnuGettextInstance();
	void __fastcall UseLanguage(System::UnicodeString LanguageCode);
	System::WideString __fastcall gettext(const System::WideString szMsgId);
	System::WideString __fastcall ngettext(const System::WideString singular, const System::WideString plural, System::LongInt Number);
	System::UnicodeString __fastcall GetCurrentLanguage();
	System::WideString __fastcall GetTranslationProperty(System::UnicodeString Propertyname);
	System::WideString __fastcall GetTranslatorNameAndEmail();
	void __fastcall TP_Ignore(System::TObject* AnObject, const System::UnicodeString name);
	void __fastcall TP_GlobalIgnoreClass(System::TClass IgnClass);
	void __fastcall TP_GlobalIgnoreClassProperty(System::TClass IgnClass, System::UnicodeString propertyname);
	void __fastcall TP_GlobalHandleClass(System::TClass HClass, TTranslator Handler);
	TExecutable* __fastcall TP_CreateRetranslator();
	void __fastcall TranslateProperties(System::TObject* AnObject, System::UnicodeString textdomain = System::UnicodeString());
	void __fastcall TranslateComponent(System::Classes::TComponent* AnObject, System::UnicodeString TextDomain = System::UnicodeString());
	System::WideString __fastcall dgettext(const System::UnicodeString szDomain, const System::WideString szMsgId);
	System::WideString __fastcall dngettext(const System::WideString szDomain, const System::WideString singular, const System::WideString plural, System::LongInt Number);
	void __fastcall textdomain(const System::UnicodeString szDomain);
	System::UnicodeString __fastcall getcurrenttextdomain();
	void __fastcall bindtextdomain(const System::UnicodeString szDomain, const System::UnicodeString szDirectory);
	void __fastcall SaveUntranslatedMsgids(System::UnicodeString filename);
	
protected:
	void __fastcall TranslateStrings(System::Classes::TStrings* sl, System::UnicodeString TextDomain);
	
private:
	System::UnicodeString curlang;
	TGetPluralForm curGetPluralForm;
	System::UnicodeString curmsgdomain;
	System::Sysutils::TMultiReadExclusiveWriteSynchronizer* savefileCS;
	System::TextFile savefile;
	System::Classes::TStringList* savememory;
	System::UnicodeString DefaultDomainDirectory;
	System::Classes::TStringList* domainlist;
	System::Classes::TStringList* TP_IgnoreList;
	System::Classes::TList* TP_ClassHandling;
	TExecutable* TP_Retranslator;
	void __fastcall SaveCheck(System::WideString szMsgId);
	void __fastcall TranslateProperty(System::TObject* AnObject, System::Typinfo::PPropInfo PropInfo, System::Classes::TStrings* TodoList, System::UnicodeString TextDomain);
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
#define DefaultTextDomain L"default"
static const bool RuntimePackageSupportEnabled = false;
extern DELPHI_PACKAGE System::UnicodeString ExecutableFilename;
extern DELPHI_PACKAGE TGnuGettextInstance* DefaultInstance;
extern DELPHI_PACKAGE System::WideString __fastcall gettext(const System::WideString szMsgId);
extern DELPHI_PACKAGE System::WideString __fastcall _(const System::WideString szMsgId);
extern DELPHI_PACKAGE System::WideString __fastcall dgettext(const System::UnicodeString szDomain, const System::WideString szMsgId);
extern DELPHI_PACKAGE System::WideString __fastcall dngettext(const System::UnicodeString szDomain, const System::WideString singular, const System::WideString plural, System::LongInt Number);
extern DELPHI_PACKAGE System::WideString __fastcall ngettext(const System::WideString singular, const System::WideString plural, System::LongInt Number);
extern DELPHI_PACKAGE void __fastcall textdomain(const System::UnicodeString szDomain);
extern DELPHI_PACKAGE System::UnicodeString __fastcall getcurrenttextdomain();
extern DELPHI_PACKAGE void __fastcall bindtextdomain(const System::UnicodeString szDomain, const System::UnicodeString szDirectory);
extern DELPHI_PACKAGE void __fastcall TP_Ignore(System::TObject* AnObject, const System::UnicodeString name);
extern DELPHI_PACKAGE void __fastcall TP_GlobalIgnoreClass(System::TClass IgnClass);
extern DELPHI_PACKAGE void __fastcall TP_GlobalIgnoreClassProperty(System::TClass IgnClass, System::UnicodeString propertyname);
extern DELPHI_PACKAGE void __fastcall TP_GlobalHandleClass(System::TClass HClass, TTranslator Handler);
extern DELPHI_PACKAGE void __fastcall TranslateProperties(System::TObject* AnObject, System::UnicodeString TextDomain = System::UnicodeString());
extern DELPHI_PACKAGE void __fastcall TranslateComponent(System::Classes::TComponent* AnObject, System::UnicodeString TextDomain = System::UnicodeString());
extern DELPHI_PACKAGE System::AnsiString __fastcall LoadResStringA(System::PResStringRec ResStringRec);
extern DELPHI_PACKAGE System::WideString __fastcall GetTranslatorNameAndEmail();
extern DELPHI_PACKAGE void __fastcall UseLanguage(System::UnicodeString LanguageCode);
extern DELPHI_PACKAGE System::WideString __fastcall LoadResString(System::PResStringRec ResStringRec);
extern DELPHI_PACKAGE System::WideString __fastcall LoadResStringW(System::PResStringRec ResStringRec);
extern DELPHI_PACKAGE System::UnicodeString __fastcall GetCurrentLanguage();
extern DELPHI_PACKAGE bool __fastcall LoadDLLifPossible(System::UnicodeString dllname = L"gnu_gettext.dll");
extern DELPHI_PACKAGE void __fastcall AddDomainForResourceString(System::UnicodeString domain);
}	/* namespace Gnugettext */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GNUGETTEXT)
using namespace Gnugettext;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// GnugettextHPP
